<style>
    .paginationControl {
        padding: 10px;
        font-family: arial;
        font-size: 12px;
        color: #333333;
        height: 13px;
    }
    .paginationControl_showing {
        float: left;
        position: relative;
        font-weight: bold;
    }
    .paginationControl_showing strong.current {
        color: #a8050d;
    }
    .paginationControl_pages {
        float: right;
        position: relative;
        font-weight: bold;
        color: #494848;
    }

    .paginationControl_pages a {
        color: #494848;
    }

    .paginationControl_pages strong {
        color: #a8050d;
    }

    .paginationControl_pages .previous, .paginationControl_pages .next {
        color: #a8050d;
    }
</style>

<?php
if ($this->pageCount) :
    $midRange = floor(sizeof($this->pagesInRange) / 2);
    if (($this->current + $midRange) < $this->pageCount) :
        array_pop($this->pagesInRange);
        $display_end = true;
    endif;
    ?>
    <div class="paginationControl<?php echo $this->position; ?>">
        <div class="paginationControl_showing">
            Viewing page <strong class="current"><?php echo $this->current; ?></strong> of <strong class="last"><?php echo $this->last; ?></strong>
        </div>
        <div class="paginationControl_pages">
            <!-- Previous page link -->
            <?php if (isset($this->previous)): ?>
                <a href="<?php echo $this->url(array('page' => $this->previous)) . $this->query; ?>" class="previous">&lt; Previous</a> |
            <?php else: ?>
                <span class="disabled">&lt; Previous</span> |
            <?php endif; ?>
            <?php if (($this->current - $midRange) > $this->first): ?>
                <?php array_shift($this->pagesInRange); ?>
                <a href="<?php echo $this->url(array('page' => $this->first)) . $this->query; ?>" ><?php echo $this->first ?></a>... |
            <?php endif; ?>
            <!-- Numbered page links -->
            <?php foreach ($this->pagesInRange as $page): ?>

                <?php if ($page != $this->current): ?>
                    <a href="<?php echo $this->url(array('page' => $page)) . $this->query; ?>" ><?php echo $page; ?></a> |
                <?php else: ?>
                    <strong><?php echo $page; ?></strong> |
                <?php endif; ?>
            <?php endforeach; ?>
            <?php if (!empty($display_end)) : ?>
                ...<a href="<?php echo $this->url(array('page' => $this->last)) . $this->query; ?>" ><?php echo $this->last ?></a> |
            <?php endif; ?>
            <!-- Next page link -->
            <?php if (isset($this->next)): ?>
                <a href="<?php echo $this->url(array('page' => $this->next)) . $this->query; ?>" class="next">Next &gt;</a>
            <?php else: ?>
                <span class="disabled">Next &gt;</span>
    <?php endif; ?>
        </div>
    </div>
<?php endif; ?>